xen/arm: Tighten memory attribute requirement for memory shared
authorJulien Grall <julien.grall@arm.com>
Tue, 8 Aug 2017 17:17:26 +0000 (18:17 +0100)
committerStefano Stabellini <sstabellini@kernel.org>
Mon, 21 Aug 2017 20:16:44 +0000 (13:16 -0700)
commitbcb9a02adf99b26b0cdf18cc67b6d48a03da5844
treed25fec9be4c7e8ea40ffa6021ce49974a0e5a1aa
parentae3f9f2af088e512b054352f3aa186f3d4157b5c
xen/arm: Tighten memory attribute requirement for memory shared

Xen allows shared mapping to be Normal inner-cacheable with any inner cache
allocation strategy and no restriction of the outer-cacheability.

However, Xen is always mapping those region Normal Inner Write-Back
Outer Write-Back Inner-shareable. Per B2.8 "Mismatched memory
attributes" in ARM DDI 0487B.a, if the guest is not using the exact same
memory attributes (excluding any cache allocation hints) for the shared
region then the region will be accessed with mismatched attributes.

This will result to potential loss of coherency, and may impact the
performance.

Given that the ARM ARM strongly recommends to avoid using mismatched
attributes, we should impose shared region to be Normal Inner Write-Back
Outer Write-Back Inner-shareable.

Signed-off-by: Julien Grall <julien.grall@arm.com>
Reviewed-by: Stefano Stabellini <sstabellini@kernel.org>
Signed-off-by: Stefano Stabellini <sstabellini@kernel.org>
xen/include/public/arch-arm.h